import { computed } from "@vue/runtime-core";
import { designComponent } from "src/use/designComponent";
import { useStyle, StyleProps } from "src/use/useStyle";

export default designComponent({
  props: {
    ...StyleProps
  },
  setup({ setupContext }) {
    const { styleComputed } = useStyle();

    const classes = computed(() => [
      "cv-use-style-parent",
      "cv-use-style-parent-status-" + styleComputed.value.status
    ]);

    return {
      render: () => (
        <div class={classes.value}>
          <h6>parent</h6>
          {setupContext.slots.default!()}
        </div>
      )
    };
  }
});
